package controller;

import java.awt.Color;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Globals {
	/** Globally accessible thread pool */
	public static final ExecutorService mainExecutor = Executors.newCachedThreadPool();
	
	/**
	 * If set to true, garbage collection is invoked explicitly each time before triangulating using FastLMT.
	 * Unfortunately, garbage collection may degrade performance significantly after
	 * triangulating a few large point sets. In order not to affect the algorithm run time, the
	 * garbage collector can be triggered beforehand explicitly by setting this flag to true.
	 * The parallel garbage collector (which can be chosen by -XX:+UseParallelGC) does not degrade
	 * performance over time as much. Unfortunately in our case it is quite a bit slower to begin with.
	 */
	public static boolean USE_EXPLICIT_GARBAGE_COLLECTION = true;
	
	/** kdTree: The divider will be halfway between the median and its greater neighbor if set to true, otherwise the divider will be at the median. */
	public static boolean INTERPOLATE_DIVIDER = false;
	
	public static boolean HIGHLIGHT_PROBLEMATIC_EDGES = true;
	
	public static int MAXIMUM_SIZE_FOR_INTERACTIVE_MODE = 500;
	
	public static int VERTEX_SIZE_STANDARD = 3;
	public static int VERTEX_SIZE_HIGHLIGHTED = 4;
	public static boolean SHOW_EDGE_ID = false;
	public static boolean SHOW_VERTEX_ID = false;
	
	public static Color EDGE_COLOR_STANDARD = Color.gray;
	public static Color EDGE_COLOR_HIGHLIGHTED = Color.red;
	public static Color EDGE_COLOR_LOCALLY_MINIMAL = Color.lightGray;
	public static boolean DRAW_EDGE_LOCALLY_MINIMAL = true;
	public static Color EDGE_COLOR_CONVEX_HULL = Color.blue.darker();
	public static Color EDGE_COLOR_FAILED_DIAMOND_TEST = Color.red.brighter();
	public static Color EDGE_COLOR_IN = Color.black;
	public static Color EDGE_COLOR_LMT_HOLE = Color.red;
	public static boolean DRAW_EDGE_LMT_HOLE = true;
	public static boolean LOG_MESSAGES_POLYGON_TRIANGULATOR = false;
	
	public static int TRIANGLE_WINDOW_WIDTH = 900;
	public static int TRIANGLE_WINDOW_HEIGHT = 550;
	
}
